package parser;

class Patch {
    
    private int location;
    
    Patch(int location) {
        this.location = location;
    }
    
    void patch(ByteStream stream) {
        stream.patchShort(location + 1, stream.size() - location);
    }
    
    static class Pair extends Patch {
           
        Patch first;
        Patch second;
        
        Pair(Patch first, Patch second) {
            super(-100);   
            this.first = first;
            this.second = second;
        }
        
        void patch(ByteStream stream) {
            first.patch(stream);
            second.patch(stream);
        }
        
    }
}
